package com.xyz.auth.controller;

import com.alibaba.fastjson.JSONObject;
import com.xyz.auth.common.R;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * 模拟一个服务，需要登陆访问
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping(value ="/getUserById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public R findForSysUser(String uid) {
        JSONObject user = new JSONObject();
        user.put("uid",uid);
        user.put("name","aa");
        user.put("age","12");
        return R.ok(user);
    }
}
